-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sql: allow procedures to call other procedures #120674
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 3 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @DrewKimball and @yuzefovich)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 3 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: complete! 2 of 0 LGTMs obtained (waiting on @mgartner and @yuzefovich)
pkg/sql/opt/optbuilder/builder.go
line 343 at r2 (raw file):
activeVersion := b.evalCtx.Settings.Version.ActiveVersion(b.ctx) if !activeVersion.IsActive(clusterversion.V24_1) { panic(unimplemented.Newf("user-defined functions", "%s usage inside a function definition is not supported until version 23.2", stmt.StatementTag()))
[nit] Should this say "stored procedure"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 3 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: complete! 3 of 0 LGTMs obtained (waiting on @DrewKimball and @mgartner)
pkg/sql/opt/optbuilder/builder.go
line 343 at r2 (raw file):
Previously, DrewKimball (Drew Kimball) wrote…
[nit] Should this say "stored procedure"?
Also, probably s/23.2/24.1/
?
pkg/sql/logictest/testdata/logic_test/procedure
line 125 at r1 (raw file):
statement error pgcode 0A000 unimplemented: CALL usage inside a function definition CREATE FUNCTION err(i INT) RETURNS VOID LANGUAGE SQL AS 'CALL p()'
nit: do we have tests in which a UDF calls a procedure and vice versa?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 3 of 0 LGTMs obtained (waiting on @DrewKimball and @yuzefovich)
pkg/sql/opt/optbuilder/builder.go
line 343 at r2 (raw file):
Previously, yuzefovich (Yahor Yuzefovich) wrote…
Also, probably
s/23.2/24.1/
?
done
pkg/sql/logictest/testdata/logic_test/procedure
line 125 at r1 (raw file):
Previously, yuzefovich (Yahor Yuzefovich) wrote…
nit: do we have tests in which a UDF calls a procedure and vice versa?
No, but I have a follow-up PR which this that I'll post shortly.
This commit rearranges some existing tests and adds a few new tests for UDFs that invoke other UDFs. Release note: None
Release note (sql change): Stored procedures can now invoke other stored procedures via `CALL` statements.
TFTRs! bors r+ |
sql/logictest: add more tests for UDFs calling UDFs
This commit rearranges some existing tests and adds a few new tests for
UDFs that invoke other UDFs.
Release note: None
sql: allow procedures to call other procedures
Fixes #88198
Release note (sql change): Stored procedures can now invoke other
stored procedures via
CALL
statements.